﻿using UnityEngine;
using System.Collections;

public class CameraFollow : MonoBehaviour {

	public GameObject player;
	public float distance;
	private Transform thisTransform;

	void Start(){
		thisTransform = transform;
	}

	void Update(){
		/*Camera.transform.position.z = player.transform.position.z -distance;
		Camera.transform.position.y = player.transform.position.y;
		Camera.transform.position.x = player.transform.position.x;*/
		thisTransform.position = new Vector3(player.transform.position.x, player.transform.position.y, player.transform.position.z -distance);
	}

}